package com.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;


@Controller
public class IndexController {
    //被MyMvcConfig中的视图解析方法替代了
    @RequestMapping("/hello")
    public String index1(){
        return "redirect:/wei.html";
    }
    @RequestMapping("/quit")
    public String quit(HttpServletRequest request){
        request.getSession().invalidate();
        return "index";
    }
}
